<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
		*{
			margin: 0px;
			padding: 0px;
		}
			#MAX1{
				width: 100%;
				height: 600px;
				background-color: aqua;
				display: flex;
				align-items: center;	
				justify-content: center;
			}
			#ZHE{
				width: 600px;
				height: 500px;
				display: flex;
				align-items: center;
				overflow: hidden;
			}
			#Bg_img{
				display: flex;
				height: 100px;
				width: 1600px;
				
			}
			#Bg_img img{
				height: 100PX;
				width: 100PX;
			}
		</style>
	</head>
	<body>
		<div id="MAX1">
			<div id="ZHE">
				<div id="Bg_img" onmouseenter="au();" onmouseleave="bu();">
					<img src="./img/tupian/1.jpeg" >
					<img src="./img/tupian/2.jpeg" >
					<img src="./img/tupian/3.jpeg" >
					<img src="./img/tupian/4.jpeg" >
					<img src="./img/tupian/5.jpeg" >
					<img src="./img/tupian/6.jpeg" >
					<img src="./img/tupian/7.jpeg" >
					<img src="./img/tupian/8.jpeg" >
					<img src="./img/tupian/9.jpeg" >
					<img src="./img/tupian/10.jpeg">
					<img src="./img/tupian/1.jpeg" >
					<img src="./img/tupian/2.jpeg" >
					<img src="./img/tupian/3.jpeg" >
					<img src="./img/tupian/4.jpeg" >
					<img src="./img/tupian/5.jpeg" >
					<img src="./img/tupian/6.jpeg" >
					
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		var imgobj = document.getElementById('Bg_img');
		var marginLeft=0;
		var sum = null;
		var pp= true;
		document.getElementById('Bg_img').onmouseenter = function(){
			pp= false;
		};
		document.getElementById('Bg_img').onmouseleave = function(){
			pp = true ;
		}
		
		 function imga(){
			 if(!pp){
				 return ;
			 }
			marginLeft--;
			imgobj.style.marginLeft=marginLeft+'px';
			if(marginLeft==-1000 ){
				marginLeft=0;
			}
			console.log('1111')
			if(marginLeft%100==0){
					clearInterval(sum);
					setTimeout(function(){
						sum=setInterval (imga,10);
					},1000);
			}
		}
		function au(){
			clearInterval(sum);
		}
		function bu(){
			
				sum=setInterval(imga,10);
		
		}
		onload = function  (){
			sum=setInterval (imga,10);
		}
		
	</script>
</html>
